<%@ include file="header.jsp" %>

<script type="text/javascript">
	function setUpRemove() {
		actURL = "<c:url value='/dashboard/remove/${company.id}'/>";
		$("#actionForm").attr('action', actURL);
		//alert($("#actionForm").attr('action'));
	}

	function setUpBlock() {
		actURL = "<c:url value='/dashboard/block/${company.id}'/>";
		$("#actionForm").attr('action', actURL);
		//alert($("#actionForm").attr('action'));
	}

	
</script>

			 <!-- modal content -->
			<div id="osx-modal-content">
				<div id="osx-modal-title"><fmt:message key='action.generic.cause.msg'/>:</div>
				<div class="close"><a href="#" class="simplemodal-close">x</a></div>
				
				<div id="osx-modal-data">	
					<form method="POST" id="actionForm">
						<textarea name="comment" rows="5" style="width:100%"></textarea><br/>
						<input type="submit"  title="<fmt:message key='action.generic.data.send'/>" value="<fmt:message key='action.generic.data.send'/>"/>
					</form>
				</div>
		</div>
			<div class="conten_dcha">
				<div class="intra_detalle">
					<div class="glossymenu">
						
						<a class="menuitem submenuheader" href="#" ><fmt:message key='company.data.register.information.title'/></a>
						
						<div class="submenu">	
							<ul>
								<li><fmt:message key='user.login.user'/>: <span>${company.participantInfo.email}</span></li>
								<li><fmt:message key='user.login.password'/>: <span>${company.participantInfo.password}</span></li>
								<li><fmt:message key='company.data.registration.date'/>: <span>${company.formattedCreatedDate}</span></li>
								<li><fmt:message key='company.data.last.update'/>: <span>${company.formattedUpdatedDate}</span></li>					
							</ul>
						
						</div>
						
						<a class="menuitem submenuheader" href="#" ><fmt:message key='company.dataManage.fragment.data.title'/></a>
						
						<div class="submenu">	
							<ul>
								<li><fmt:message key='company.data.name'/>: <span>${company.companyInfo.name}</span></li>
								<li><fmt:message key='company.data.street'/> :<span>${company.companyInfo.street}</span></li>
								<li><fmt:message key='company.data.zip'/>: <span>${company.companyInfo.zip}</span></li>
								<li><fmt:message key='company.data.city'/>: <span>${company.companyInfo.city}</span></li>
								<li><fmt:message key='company.data.country'/>: <span>${company.companyInfo.country}</span></li>
								<li><fmt:message key='company.data.telephone'/>: <span>${company.companyInfo.telephone}</span></li>
								<li><fmt:message key='company.data.contact.email'/>: <span>${company.companyInfo.email}</span></li>
								<li><fmt:message key='company.data.contact.person'/>: <span>${company.companyInfo.contactPerson}</span></li>
								<li><fmt:message key='company.data.activity.sector'/>:
								<c:forEach items="${sicCodes}" var="sicCode">            			
              						<c:if test="${company.companyInfo.sicCode == sicCode.code}">
              					 		<span><fmt:message key="${sicCode.descriptionCode}"/></span>
              						</c:if>
              					</c:forEach>
								</li>					
							</ul>
						
						</div>
						
						
						<a class="menuitem" href="#" style="cursor:text;"><fmt:message key='company.detail.fragment.video.title'/></a>
							<div class="subcontent">
								<c:if test="${!empty company.videos}">
						<c:set var="video" value="${company.videos[0]}"/>
						<div class="subcontent">
							<div id="ytapiplayer" >
    							<fmt:message key="flashplayer.advice"/>
  							</div>
						</div>
						
						<script type="text/javascript">
    						var params = { allowScriptAccess: "always" };
    						var atts = { id: "myytplayer" };
    						swfobject.embedSWF("http://www.youtube.com/v/${video.youTubeId}&enablejsapi=1&playerapiid=ytplayer", 
                       			"ytapiplayer", "425", "344", "8", null, null, params, atts);
				  		</script>
					</c:if>
							</div>
						<a class="menuitem submenuheader" href="#"><fmt:message key='company.detail.fragment.goodpractice.title'/></a>
						<div class="submenu">
							<ul>
								<li><fmt:message key='goodpractice.data.title'/>: <span>${company.additionalInformation.title}</span></li>
								<li><fmt:message key='goodpractice.data.description'/>: <span>${company.additionalInformation.information}</span></li>
								<li><fmt:message key='goodpractice.data.project.summary'/>:<a href="<c:url value='/company/download-summary/${company.id}'/>" title="<fmt:message key='action.company.goodpractice.summary.download'/>" >
										<fmt:message key='action.company.goodpractice.summary.download'/>
								</a></li>
								<li><fmt:message key='goodpractice.data.innovation.type'/>:
									<ul>
										<c:forEach items="${types}" var="type">														
											<c:forEach items="${company.additionalInformation.innovationTypeCodes}" var="typeCode">
												<c:if test="${typeCode == type.code}">
													<li><fmt:message key="${type.titleCode}"/></li>
												</c:if>
											</c:forEach>
              							</c:forEach>
									</ul>
								</li>
							</ul>						
					</div>
					
					
					<a class="menuitem submenuheader" href="#"><fmt:message key='company.detail.fragment.votes.title'/></a>
						<div class="submenu">
							<p><strong><fmt:message key='company.detail.votes.total'/>: ${fn:length(company.votes)}</strong></p>
							<p><fmt:message key='company.detail.votes.list'/>:</p>
							<ul>
								<c:forEach items="${company.votes}" var="vote">
									<li>${vote.email}&nbsp;(<fmt:formatDate value="${vote.releaseDate}" type="both" timeStyle="long" dateStyle="long" pattern="dd-mm-yyyy"/>)</li>
								</c:forEach>
							</ul>		
						</div>
			 			
			</div>
						<a href="#" class="osx-remove bt_standar bt_notvalidate" title="Remove company">
							<span>Delete</span>
						</a>
						
				<c:choose>
					<c:when test="${!company.validated}">
						<a href="<c:url value='/dashboard/validate/${company.id}'/>" 
								class="bt_standar bt_validate" title="<fmt:message key='action.company.validate'/>">
							<span><fmt:message key='action.company.validate'/></span>
						</a>
					</c:when>
					<c:otherwise>
						<a href="#" class="osx-block bt_standar bt_notvalidate" title="<fmt:message key='action.company.block'/>">
							<span><fmt:message key='action.company.block'/></span>
						</a>
						<c:choose>
							<c:when test="${!company.preselected}">
								<a href="<c:url value='/dashboard/preselect/${company.id}'/>" class="bt_standar bt_notvalidate" title="<fmt:message key='action.company.preselect'/>">
									<span><fmt:message key='action.company.preselect'/></span>
								</a>
							</c:when>
							<c:otherwise>
								<a href="<c:url value='/dashboard/unpreselect/${company.id}'/>" class="bt_standar bt_notvalidate" title="<fmt:message key='action.company.unpreselect'/>">
									<span><fmt:message key='action.company.unpreselect'/></span>
								</a>
								<c:choose>
									<c:when test="${!company.finalist}">
										<a href="<c:url value='/dashboard/finalist/${company.id}'/>" class="bt_standar bt_notvalidate" title="<fmt:message key='action.company.finalist'/>">
											<span><fmt:message key='action.company.finalist'/></span>
										</a>
									</c:when>
									<c:otherwise>
										<a href="<c:url value='/dashboard/unfinalist/${company.id}'/>" class="bt_standar bt_notvalidate" title="<fmt:message key='action.company.unfinalist'/>">
											<span><fmt:message key='action.company.unfinalist'/></span>
										</a>
									</c:otherwise>
								</c:choose>
								
							</c:otherwise>
						</c:choose>
					</c:otherwise>	
				</c:choose>
				
				
				</div>
			</div>
<%@ include file="footer.jsp" %>